home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / Anwender / Office / STFax / Rexx / FW2STFax.rexx < prev    next >
OS/2 REXX Batch file  |  1998-01-10  |  1KB  |  70 lines

  1. /*
  2.     $VER: FW2STFax.rexx 1.1 (06.05.97)
  3.  
  4.     by Simone Tellini with the help of Achim Klopsch
  5.     New features added by Stefano Guarnieri
  6. */
  7.  
  8. /* Switch Off TurboPrint before Fax   */
  9. /* Uncomment next line if you are a TurboPrint user; see also below */
  10.  
  11. /* ADDRESS COMMAND 'TURBOPrint:NoTurbo' */
  12.  
  13. /* Read Density */
  14.  
  15. 'GetGfxPrintPrefs Density'
  16.  
  17. prefs = result
  18.  
  19. initiation = run "STFax:STFax"
  20.  
  21. IF ~show('P','STFAX.1') THEN DO
  22.  
  23.     /*  If STFAX was not started   */
  24.  
  25.     ADDRESS COMMAND initiation
  26.     ADDRESS COMMAND "SYS:RexxC/WaitForPort STFAX.1"
  27. END
  28.  
  29. 'GFXPRINTPREFS Density 7' 
  30.  
  31. /* this command sets the paper feed to continuous */
  32.  
  33. 'GetPrintSetup FEED'
  34. pagemode = result
  35.  
  36. 'PRINTSETUP FEED CONTINUOUS PAGES ALL'
  37.  
  38. ADDRESS 'STFAX.1' 'PRTDRIVER ON'
  39.  
  40. CALL ToCover
  41.  
  42. 'PRINT'
  43.  
  44. 'GFXPRINTPREFS density' prefs
  45. 'PrintSetup FEED' pagemode
  46.  
  47. ADDRESS 'STFAX.1' 'PRTDRIVER OFF'
  48.  
  49. /* uncomment next line if you are a TurboPrint user */
  50.  
  51. /* ADDRESS COMMAND 'TurboPrint:TurboPrefs -q' */
  52.  
  53. EXIT
  54.  
  55.  
  56. ToCover:
  57.    OPTIONS Results
  58.    GETSECTIONLIST
  59.    list = Result
  60.    IF INDEX(list,"Fax_Cover")=0 THEN NOP
  61.    ELSE
  62.       DO
  63.          GOTOSECTION Fax_Cover
  64.          MOVETOLINE 1 0
  65.          UPDATEDATE
  66.          UPDATETIME
  67.       END
  68.    RETURN
  69.  
  70.